home *** CD-ROM | disk | FTP | other *** search
/ The PC-SIG Library 10 / The PC-Sig Library - Shareware for the IBM PC and Compatibles (PC-SIG)(Tenth Edition Disks 1-2804)(1991).iso / PC_SIGCD / 01 / 6 / DISK0162.ZIP / CLS.INC < prev    next >
Text File  |  1984-06-25  |  1KB  |  39 lines

  1. ' CLS.INC:         Procedures to make clearing the screen faster.
  2. '
  3. ' version:        06-25-84
  4. ' compiler:        Structured BASIC v1.12
  5. ' uses:            assemler routine CLS.DATA
  6. ' module type:    include
  7. '
  8. ' Function FNWHERE(P) locates assembler language program as a
  9. ' string in memory. Be careful about changing code to load it!
  10.  
  11. procedure SETUP.CLS        'Load the assembler program, set up variables
  12.     def FNWHERE(P) = 256*peek(P+2) + peek(P+1)
  13.     CLS.ASM$ = space$(23)
  14.     restore CLS.DATA
  15.     SETUP.CLS.P = FNWHERE(VARPTR(CLS.ASM$))
  16.     for SETUP.CLS.I%=1 to 22
  17.         read SETUP.CLS.J%
  18.         poke SETUP.CLS.P,SETUP.CLS.J%
  19.         SETUP.CLS.P = SETUP.CLS.P + 1
  20.     next SETUP.CLS.I%
  21. endproc
  22.  
  23. procedure CLEOS            'Clear from cursor to end of screen
  24.     EOS.COUNT% = 24*SCREEN.WIDTH - (csrlin-1)*SCREEN.WIDTH - pos(0)
  25.     CLS.SUB = FNWHERE(varptr(CLS.ASM$))
  26.     call CLS.SUB(EOS.COUNT%)
  27. endproc
  28.  
  29. procedure CLEOL            'Clear from cursor to end of line
  30.     EOL.COUNT% = SCREEN.WIDTH-pos(0)
  31.     CLS.SUB = FNWHERE(varptr(CLS.ASM$))
  32.     call CLS.SUB(EOL.COUNT%)
  33. endproc
  34.  
  35. CLS.DATA|
  36.     data &H55, &H8B, &HEC, &H8B, &H76, &H06, &H8B, &H0C, &HB7, &H00
  37.     data &HB0, &H20, &HB3, &H07, &HB4, &H09, &HCD, &H10, &H5D, &HCA
  38.     data &H02, &H00
  39.